package top.myhdg.bijou.activity;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;

import com.bumptech.glide.Glide;

import top.myhdg.bijou.R;

public class ShowImgActivity extends BaseActivity {

    ImageView imageView;

    String imgUrl = "";

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_showimg);

        Bundle bundle = getIntent().getExtras();
        if (bundle != null) {
            if (bundle.containsKey("imgUrl")) {
                imgUrl = bundle.getString("imgUrl");
            }
        }

        imageView = findViewById(R.id.imageView);
        Glide.with(this).load(imgUrl).into(imageView);

        Button exitShowImg = findViewById(R.id.exitShow);
        exitShowImg.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                ShowImgActivity.this.finish();
            }
        });
    }
}
